home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 235 / Issue 235 - September 2007 - DPCS0907DVD.ISO / Extras / NetObjects Fusion / NOF10.exe / data1.cab / FSI / lib / nof / util / ObjectDumper.js < prev    next >
Encoding:
Text File  |  2007-04-11  |  1.2 KB  |  59 lines

  1. /****i* SOURCE_FILE/INFO
  2.     *
  3.     * NAME
  4.     *  ObjectDumper.js
  5.     *
  6.     * USAGE
  7.     *  Part of Netobjects JavaScript Library.
  8.     *
  9.     * COPYRIGHT
  10.     *  Copyright ⌐ 2000-2005 Website Pros, Inc.
  11.     *  All Rights Reserved.
  12.     *
  13.     *  This is an unpublished work protected by Website Pros, Inc.
  14.     *  as a trade secret, and is not to be used or disclosed except as
  15.     *  expressly provided in a written license agreement executed by
  16.     *  you and Website Pros, Inc.
  17.     *
  18.     *      <copyright@websitepros.com>
  19.     *
  20.     * NOTES
  21.     *  JavaScript code.
  22.     *
  23.     *****/
  24.  
  25. if (!IS.isModuleInitialized("IS.NOF.UTIL.ObjectDumper"))
  26. {
  27.     
  28.     /****h* NOF_JavaScript_Library/NOF.UTIL.ObjectDumper
  29.     *
  30.     * NAME
  31.     *  NOF.UTIL.ObjectDumper
  32.     *
  33.     * DESCRIPTION
  34.     *   
  35.     *
  36.     ****/    
  37.     function NOF_ObjectDumper(){
  38.         this.__proto__      = NOF_ObjectDumper;
  39.         
  40.         this.dump = dump;
  41.         
  42.         function dump( obj, obj_name ){
  43.             var result = ""
  44.                 for (var i in obj) {
  45.                     result += obj_name + "." + i + " = " + obj[i] + "\n"
  46.                     }
  47.                 
  48.                 result += "\n\n"
  49.                 return result;
  50.         }  
  51.     }
  52.     
  53.     NOF.UTIL.__proto__.ObjectDumper = new NOF_ObjectDumper();
  54.     
  55.     //TODO: delete it from NOF NS
  56.     NOF.__proto__.ObjectDumper = new NOF_ObjectDumper();
  57.     
  58. }
  59.